package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.excel.hyproject;

import java.io.Serializable;
import java.util.Date;

public class DurationBondId implements Serializable {
    private static final long serialVersionUID = 1L;
    private Date date;
    private String state;
    private String projectName;
    private String projectCode;
    private String bondShortname;

    public DurationBondId(){
        super();
    }

    public DurationBondId(String state,Date date,String projectName,String projectCode,String bondShortname){
        super();
        this.projectName=projectName;
        this.date=date;
        this.projectCode=projectCode;
        this.state=state;
        this.bondShortname=bondShortname;
    }

    public String getBondShortname() {
        return bondShortname;
    }

    public void setBondShortname(String bondShortname) {
        this.bondShortname = bondShortname;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Date getDate() {
        return date;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((projectCode == null) ? 0 : projectCode.hashCode());
        result = prime * result + ((date == null) ? 0 : date.hashCode());
        result = prime * result + ((projectName == null) ? 0 : projectName.hashCode());
        result = prime * result + ((state == null) ? 0 : state.hashCode());
        result = prime * result + ((bondShortname == null) ? 0 : bondShortname.hashCode());
        return result;
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        DurationBondId other = (DurationBondId) obj;
        if (projectName == null) {
            if (other.projectName != null)
                return false;
        } else if (!projectName.equals(other.projectName))
            return false;
        if (date == null) {
            if (other.date != null)
                return false;
        } else if (!date.equals(other.date))
            return false;
        if (projectCode == null) {
            if (other.projectCode != null)
                return false;
        } else if (!projectCode.equals(other.projectCode))
            return false;
        if (state == null) {
            if (other.state != null)
                return false;
        } else if (!state.equals(other.state))
            return false;
        if (bondShortname == null) {
            if (other.bondShortname != null)
                return false;
        } else if (!bondShortname.equals(other.bondShortname))
            return false;
        return true;
    }
}
